<script setup>
import { inject } from 'vue';

const MessageBoxService = inject('MessageBoxService');
function showInfo() {
    MessageBoxService.info('This is a message box.', 'You can use it to show information.');
}

function showWarningInfo() {
    MessageBoxService.warning('This is a warning box.', 'You can use it to show warning information.');
}

function showSuccessInfo() {
    MessageBoxService.success('This is a success box.', 'You can use it to show success information.');
}

function showError() {
    MessageBoxService.error('This is a error box.', 'You can use it to show error information.');
}
</script>
<template>
    <f-button style="margin: 5px" :type="'primary'" @click="showInfo"> 提示信息 </f-button>
    <f-button style="margin: 5px" :type="'warning'" @click="showWarningInfo"> 警告信息 </f-button>
    <f-button style="margin: 5px" :type="'success'" @click="showSuccessInfo"> 成功信息 </f-button>
    <f-button style="margin: 5px" :type="'danger'" @click="showError"> 错误信息 </f-button>
</template>
